summaryrefslogtreecommitdiff
path: root/smoke/docs-main/src/pages/[slug].astro
blob: 4717cc732015521f90a91719e3c6cf2356e7f3ad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
---
export async function getStaticPaths() {
	// get english pages that moved from `/` to `/en/`
	const englishPages = Astro.fetchContent('./en/**.md');

	// add pages that are `*.astro` files as well
	const otherPages = [{ url: '/en/themes' }];
	return [...englishPages, ...otherPages].map((page) => ({
		params: {
			slug: page.url.slice(4),
		},
		props: {
			englishSlug: page.url,
		},
	}));
}
---

<meta http-equiv="refresh" content={`0;url=/docs${Astro.props.englishSlug}`} />